function [F1 F2 F3 F4 F5] = Frequencies(x)

L  = length(x);
n  = pow2(nextpow2(L));
Fs = 100;
dt = 1/Fs;
t = (0:L-1)/Fs;

y  = fft(x,n);
f2 = (1:n/2)*(Fs/n);
p  = y.*conj(y)/n;
p2 = p(1:n/2);

f=(Fs/(n/2));

Hz2  = floor(2/f);
Hz7  = floor(7/f);
Hz12 = floor(12/f);
Hz14 = floor(14/f);
Hz50 = floor(50/f);

F1 = trapz(p2(1:Hz2))    *f;
F2 = trapz(p2(Hz2:Hz7))  *f;
F3 = trapz(p2(Hz7:Hz12)) *f;
F4 = trapz(p2(Hz12:Hz14))*f;
F5 = trapz(p2(Hz14:Hz50))*f;
